//
// Created by 23098 on 2022/11/6.
//对单例模式的探究，主席类；单例模式特点，有且仅有一个
#include <iostream>
using namespace std;
class ChairMan{
public:
    //唯一接口
    static ChairMan& getman();


private:
    //三种全部设置为私有
    ChairMan(){};
    ChairMan(string name,int age){};
    ChairMan(const ChairMan& cm){};

    static ChairMan* cm;
    static void election();

    //基本信息
    string m_name;
    int m_age;
    int flag = 1;//决定是否赐予他荣誉之死；

    //设置静态函数与静态成员

};

//设置静态函数
ChairMan* ChairMan::cm = new ChairMan;

void ChairMan::election() {
    ChairMan::cm->m_age = 10;
    ChairMan::cm->m_name = "xjpiining";
    ChairMan::cm->flag = 1;
}

static ChairMan& getman(){

}

int main(){

    return 0;
}